<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<html>
<head>
    <title>未计算订单原因详情</title>
    <style>
        .table-responsive{
            overflow: auto; width: 100%;
        }
        .table {
            white-space: nowrap;
            overflow:scroll;
            width: inherit;
        }
        .table td {
            white-space: nowrap;
            text-overflow: ellipsis;
        }
    </style>
</head>
<body>
    <div ng-app="myApp" ng-controller="NoCalculationCtrl">
        <div class="row">
            <ui-container url="report/nocalculation/list" key="nocalculation-list-00">
                <ui-search-form>
                    <search-select-remote url="report/calculate/suffixs" class="col-md-3"  name="suffix" value-name="suffix" text-name="suffix" isslectfirst=true > </search-select-remote>
                    <search-select-remote class = "col-md-3" url = "system/supplier/listall" label = "供货商:" name = "supplierName" placeholder = "请选择供应商"  value-name = "name" text-name = "name">
                    </search-select-remote>
                    <search-select-remote class = "col-md-3" url = "system/carrier/carriers" label = "承运商:" name = "carrierName" placeholder = "请选择承运商" value-name = "carrierName" text-name = "carrierName">
                    </search-select-remote>
                    <search-region  class="col-md-3" label="请选择省份" p-name="toProvince"></search-region>
                    <search-input class="col-md-3" name="orgName" placeholder="请输入站点名称"></search-input>
                    <search-input class="col-md-3" name="workNo" placeholder="请输入员工工号"></search-input>
                    <search-input class="col-md-3" name="userName" placeholder="请输入员工姓名"></search-input>
                </ui-search-form>
                <ui-table-tool> </ui-table-tool>
                <ui-table dischecked=true>
                </ui-table>
                <table-page/>
            </ui-container>
        </div>
    </div>
<script>
    angular.module('myApp',['ui.table']);
    angular.module('myApp').controller('NoCalculationCtrl', function($scope){
        $scope._columns=[
            {name:'waybillNum',head:'运单号'},
            {name:'businessCode',head:'订单号'},
            {name:'supplierName',head:'商家'},
            {name:'carrierName',head:'承运商'},
            {name:'toProvince',head:'目的省'},
            {name:'toCity',head:'收件人城市'},
            {name:'toCounty',head:'收件人区县'},
            {name:'fromProvince',head:'发货省'},
            {name:'fromCity',head:'发货城市'},
            {name:'regionLevel',head:'区域级别',render(data,value){
                switch (value + ""){
                    case "0" : return "一类区域";
                    case "1" : return "二类区域";
                    case "2" : return "三类区域";
                    default : return "未知";
                };
            }},
            {name:'settlementType',head:'结算类型',render(data,value){
                switch (value + ""){
                    case "0" : return "投递员价";
                    case "1" : return "合作价";
                    case "2" : return "合作站点价";
                    default : return "未知";
                }
            }},
            {name:'postmanNo',head:'配送员id'},
            {name:'workNo',head:'配送员工号'},
            {name:'realName',head:'配送员姓名'},
            {name:'orgName',head:'配送站点'},
            {name:'calculateType',head:'计算类型',render(data,value){
                switch (value + ""){
                    case "0" :  return "按件";
                    case "1" : return "按重";
                    default : return "未计算";
                }
            }},
            {name:'major',head:'首拖件',render(data,value){
                switch (value + ""){
                    case "0" : return "首件";
                    case "1" : return "拖件";
                    case "2": return "零价件";
                    default : return "未打标";
                }
            }},
            {name:'weight',head:'重量'},
            {name:'isCombined',head:'是否组包',render(data,value){
                switch (value + ""){
                    case "0" : return "非组包";
                    case "1" : return "组包";
                    default : return "未知";
                }
            }},
            {name:'combinedWeight',head:'组包重量'},
            {name:'reason',head:'原因',render(data,value){
                switch (value + ""){
                    case "0" : return "首拖件未打标";
                    case "1" : if(data.carrierName){return "未配置规则(无省份&商家&承运商)"} else {return "没有配送员或承运商"};
                    case "2" : return "未匹配到按件规则";
                    case "3" : return "未匹配到按重规则";
                    default : return "未知";
                }
            }}
        ];
    });
</script>
</body>
</html>
